//
//  HYFWindowTool.m
//  MyOCWeibo
//
//  Created by 黄勇锋 on 16/10/6.
//  Copyright © 2016年 黄勇锋. All rights reserved.
//

#import "HYFWindowTool.h"
#import "HYFTabBarController.h"
#import "HYFNewFeatureController.h"
#import "HYFAccountTool.h"
#import "AppDelegate.h"
#import "HYFOAuthController.h"

@implementation HYFWindowTool

+ (void)switchWindowWithWindow{
    
    //判断是否有登录过
    HYFAccount *account = [HYFAccountTool account];
    //取出 appDelegate 里面的 window
    UIWindow *window = ((AppDelegate *)[UIApplication sharedApplication].delegate).window;
    
    if (account) {
        window.rootViewController = [[HYFTabBarController alloc]init];
    }else{
        window.rootViewController = [[HYFOAuthController alloc]init];
    }
    
}


@end
